﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DPLParser.DPLILCode;
using Irony.Parsing;

namespace DPLParser.DPLNodeParser.DPLScriptTreeNodeMappers.Implementations
{
    public class DPLVariableExtractor : AbstractDPLScriptItemExtractor<DPLVariable>
    {
        public DPLVariableExtractor(ParseTreeNode originalNode)
            : base(originalNode)
        {
            
        }
        
        public override DPLVariable GetItem()
        {
            DPLVariable aNewVariable = new DPLVariable();
            aNewVariable.VariableName = this.OriginalTreeNode.Token.Text;
            return aNewVariable;
        }
    }
}
